#include<iostream>
#include<ctime>
#include"ThreadPool.hpp"
#include"Task.hpp"
int main()
{
    std::cout << "process run..." <<std::endl;
    ThreadPool<Task>::GetInstance()->Start();
    srand(time(nullptr) ^ getpid());
    while(true)
    {
        int x = rand() % 10 +1;
        usleep(10);
        int y = rand() %10;
        int len = opers.size();
        char op = opers[rand()%len];
        Task t(x, y, op);
        ThreadPool<Task>::GetInstance()->Push(t);
        std::cout << "main thread make task: " << t.GetTask() << std::endl;
        sleep(1);
    }
    return 0;
}